#!/bin/sh

# script/cibuild: Setup environment for CI to run tests. This is primarily
#                 designed to run on the continuous integration server.

set -e

cd "$(dirname "$0")/.."

# Set the RAILS_ENV only when we're not using travis
if ! [ -z "$TRAVIS" ]; then
  export RAILS_ENV="test" RACK_ENV="test"
fi

# run tests
bin/rspec

# run linters
script/linter
